import {systemServer} from '../baseApi'

export class deptApi {
  static save(data) {
    return systemServer.connection('POST', '/sys/dept/save', data)
  }

  static findPage (data) {
    return systemServer.connection('POST', '/sys/dept/findPage', data)
  }

  static delete(data) {
    return systemServer.connection('POST', '/sys/dept/delete', data)
  }

  static findByName(data) {
    return systemServer.connection('GET', '/sys/dept/findByName', data)
  }

  static update(data) {
    return systemServer.connection('POST', '/sys/dept/update', data)
  }

  static findChildrenDeptById(data) {
    return systemServer.connection('GET', '/sys/dept/findChildrenDeptById/' + data, data)
  }

  static findDeptTree(data) {
    return systemServer.connection('GET', '/sys/dept/findDeptTree', data)
  }
}
